﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="EditProfile.aspx.cs" Inherits="EWDTAssignment.EditProfile" %>
<%@ Register namespace="Dune5.DateTimeUI" tagprefix="DateTimeUI" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
<style type="text/css">@import "Styles/jquery.datepick.css";</style> 
<script type="text/javascript" src="Scripts/jquery.datepick.js"></script>
<script type="text/javascript">
    $(function () {
        $('#startdate').datepick({ dateFormat: 'yyyy/mm/dd' });

    }); 
</script>
    <style type="text/css">
    .style1
    {
        width: 100%;
    }
    .style2
    {
        height: 18px;
    }
        .style7
        {
            width: 79%;
        }
    .style4
    {
            height: 18px;
            width: 79%;
        }
        .style5
        {
            width: 79%;
            height: 43px;
        }
        .style6
        {
            height: 43px;
        }
        </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    
    <br />
        <table class="style1">
            <tr>
                <td class="style7" style="font-family: Arial; font-size: medium">
                    Change Profile:</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style7">
                    <br />
                    First Name:<br />
                </td>
                <td>
                    <asp:TextBox ID="txtbxFn" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" 
                        ControlToValidate="txtbxFn" Display="Dynamic" 
                        ErrorMessage="Please enter your first name" ValidationGroup="1"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td class="style7">
                    <br />
                    Last Name:<br />
                </td>
                <td>
                    <asp:TextBox ID="txtbxln" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" 
                        ControlToValidate="txtbxln" Display="Dynamic" 
                        ErrorMessage="Please enter your last name" ValidationGroup="1"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td class="style7">
                    <br />
                    Gender:<br />
                </td>
                <td>
                    <asp:RadioButtonList ID="RadioButtonList1" runat="server">
                        <asp:ListItem>Female</asp:ListItem>
                        <asp:ListItem>Male</asp:ListItem>
                    </asp:RadioButtonList>
                </td>
            </tr>
            <tr>
                <td class="style7">
                    <br />
                    Date of Birth:<br />
                </td>
                <td>
                
                    <dune5:jdatepicker ID="txtbxdob1" DisplayFormat="dd/MM/yyyy" runat="server"/>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                    ErrorMessage="Please enter your date of birth" 
                    ControlToValidate="txtbxdob1" Display="Dynamic" ValidationGroup="1"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td class="style7">
                    <br />
                    Contact Number:<br />
                </td>
                <td>
                    <asp:TextBox ID="txtbxContactNum" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                        ControlToValidate="txtbxContactNum" 
                        ErrorMessage="please enter your contact number" ValidationGroup="1"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td class="style7">
                    <br />
                    <br />
                    Address:<br />
                    <br />
                </td>
                <td>
                    <asp:TextBox ID="txtbxAddress" runat="server" Height="75px" Width="297px"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                        ControlToValidate="txtbxAddress" Display="Dynamic" 
                        ErrorMessage="Please enter your address" ValidationGroup="1"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td class="style7">
                    <br />
                    Postal Code:<br />
                </td>
                <td>
                    <asp:TextBox ID="txtPostalCode" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
                        ControlToValidate="txtPostalCode" Display="Dynamic" 
                        ErrorMessage="Please enter your postal Code" ValidationGroup="1"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td class="style7">
                    <br />
                    Email:<br />
                </td>
                <td>
                    <asp:TextBox ID="txtbxEmail" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" 
                        ControlToValidate="txtbxEmail" Display="Dynamic" 
                        ErrorMessage="Please enter your email" ValidationGroup="1"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                        ControlToValidate="txtbxEmail" Display="Dynamic" 
                        ErrorMessage="Please enter a email address" 
                        ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" 
                        ValidationGroup="1"></asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
                <td class="style7">
                    &nbsp;</td>
                <td>
                    <br />
                </td>
            </tr>
            <tr>
                <td class="style7">
                    &nbsp;</td>
                <td>
                    <asp:Button ID="btnSubmitp" runat="server" onclick="btnSubmitp_Click" 
                        Text="Submit Profile" ValidationGroup="1" />
                </td>
            </tr>
            <tr>
                <td class="style7">
                    &nbsp;</td>
                <td>
                    <br />
                </td>
            </tr>
            <tr>
                <td class="style7" style="font-family: Arial; font-size: medium">
                    <br />
                    Change Password:<br />
                </td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style4">
                    <br />
                    Old Password:<br />
                </td>
                <td class="style2">
                    <asp:TextBox ID="txtbxOPassword" runat="server" TextMode="Password" 
                        ToolTip="Enter Password"></asp:TextBox>
                    <asp:Label ID="lblWrongPassword" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td class="style7">
                    &nbsp;</td>
                <td>
                    <br />
                </td>
            </tr>
            <tr>
                <td class="style4">
                </td>
                <td class="style2">
                </td>
            </tr>
            <tr>
                <td class="style7">
                    <br />
                    New Password:<br />
                </td>
                <td>
                    <asp:TextBox ID="txtbxNPassword" runat="server" TextMode="Password"></asp:TextBox>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" 
                        ControlToValidate="txtbxNPassword" ErrorMessage="RegularExpressionValidator" 
                        ValidationExpression="\w{6,8}" ValidationGroup="2"></asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
                <td class="style5">
                    <br />
                    Re-Enter New Password:</td>
                <td class="style6">
                    <asp:TextBox ID="txtbxRPassword" runat="server" TextMode="Password"></asp:TextBox>
                    <asp:CompareValidator ID="CompareValidatorRPassword" runat="server" 
                        ControlToCompare="txtbxNPassword" ControlToValidate="txtbxRPassword" 
                        Display="Dynamic" ErrorMessage="The password must match " ValidationGroup="2"></asp:CompareValidator>
                    <asp:RequiredFieldValidator ID="RRPassword" runat="server" 
                        ControlToValidate="txtbxRPassword" Display="Dynamic" 
                        ErrorMessage="Please re-enter your Password" ValidationGroup="2"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td class="style7">
                    &nbsp;</td>
                <td>
                    <asp:Button ID="txtbxSubmitPass" runat="server" onclick="txtbxSubmitPass_Click" 
                        Text="Submit Password" ValidationGroup="2" />
                </td>
            </tr>
            <tr>
                <td class="style7">
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style7">
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style7" 
                    style="font-family: Arial, Helvetica, sans-serif; font-size: medium">
                    <br />
                    Change Security Question
                </td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style7">
                    <br />
                    Security Question:<br />
                </td>
                <td>
                    <asp:DropDownList ID="SecurityQuestionDL" runat="server" Width="274px">
                        <asp:ListItem>-Select One-</asp:ListItem>
                        <asp:ListItem>What town was your father born in?</asp:ListItem>
                        <asp:ListItem>What is the last name of your closest childhood friend?</asp:ListItem>
                        <asp:ListItem>What was the name of your primary school?</asp:ListItem>
                        <asp:ListItem>What is the name of the street on which you grew up?</asp:ListItem>
                        <asp:ListItem>What was the name of your first pet?</asp:ListItem>
                        <asp:ListItem>What town was your mother born in?</asp:ListItem>
                        <asp:ListItem>What was the last name of favorite primary school teacher?</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td class="style7">
                    Security Answer:</td>
                <td>
                    <asp:TextBox ID="txtbxSecurityAns" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="ansVlidation" runat="server" 
                        ControlToValidate="txtbxSecurityAns" Display="Dynamic" Enabled="False" 
                        ErrorMessage="Please enter your answer" ValidationGroup="3"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td class="style7">
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style7">
                    &nbsp;</td>
                <td>
                    <asp:Button ID="btnSubmitAns" runat="server" onclick="btnSubmitAns_Click" 
                        Text="Submit Security Answer" ValidationGroup="3" />
                </td>
            </tr>
            <tr>
                <td class="style7">
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
        </table>
    
</asp:Content>
